/*
 * Project Name: jmax
 * File Name: HotelMonitorController.java
 * Copyright: Copyright(C) 1985-2015 ZKTeco Inc. All rights reserved.
 */
package com.xdtech.hotel.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.xdtech.hotel.monitor.MonitorService;
import com.xdtech.hotel.monitor.RCURunEvent;
import com.xdtech.web.model.ResultMessage;

/**
 * 
 * @version TODO 添加版本
 * @see 相关类或方法，不需要请删除此行
 * @since 2015-4-23 上午9:38:54
 */
@Controller
@Scope("prototype")
public class HotelMonitorController
{
	@Autowired
	private MonitorService monitorService;
	
	@RequestMapping(value="/hotelMonitor.do",params = "moniting")
	@ResponseBody
	public ResultMessage moniting(HttpServletRequest request,String clientId) {
		ResultMessage r = new ResultMessage(); 
		List<RCURunEvent> rcuRunEvents = monitorService.loadMonitingData(request.getSession().getId());
		r.setObj(rcuRunEvents);
		return r;
	}
}
